package Utils

import (
	"encoding/hex"
	"strings"
)

func StringToBytes(s string) []byte {
	return []byte(s)
}

func HexToBytes(s string) []byte  {
	ns := s
	ns = strings.ReplaceAll(ns, "/", "\\")
	if strings.Contains(ns, "\\x"){
		ns = strings.ReplaceAll(ns, "\\x", "")
	}
	ret , _:= hex.DecodeString(ns)
	return ret
}